<template>
  <div>
    <Loading />
  </div>
</template>

<script setup lang="ts">
import { useRoute, useRouter } from "vue-router";
import { onMounted, nextTick } from "vue";
import { getConferenceIdByShareId } from "@/services/minutes/share";
import Loading from "./components/loading/index.vue";

const route = useRoute();
const router = useRouter();

onMounted(() => {
  nextTick(() => {
    getConferenceId();
  });
});

const getConferenceId = async () => {
  const shareId = route.params.shareId || "";
  const conferenceId = await getConferenceIdByShareId(shareId as string);
  router.replace({
    path: `/record/${conferenceId}`,
  });
};
</script>

<style scoped></style>
